package com.xinqi.modules.course.content.controller.app;

import com.xinqi.common.base.response.R;
import com.xinqi.modules.course.clazz.dto.rsp.ClassAllResultDTO;
import com.xinqi.modules.course.clazz.service.ClassService;
import com.xinqi.modules.stats.assistant.dto.req.AssistantTotalCheckDTO;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * APP-新奇助手相关接口
 * @author dzy
 */
@Validated
@RestController
@RequestMapping("/app/assistant")
@RequiredArgsConstructor
public class AssistantAppController {

    private final ClassService classService;

    /**
     * 判断新奇助手消息是否可以查看详情
     * @param dto
     * @return
     */
    @GetMapping("/check")
    public R<ClassAllResultDTO> assistantCheck(AssistantTotalCheckDTO dto) {
        return R.data(classService.classAllMessage(dto.getClassId(), dto.getMessageType(), dto.getContentId(), dto.getClassRole()));
    }

}
